package com.xiangxiangjd.kj.papersstar.bean;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author 肖守凯
 * @since 2021-01-26
 */
@Data
@TableName("user_answer")
@ApiModel(value="UserAnswer对象", description="")
public class UserAnswer extends Model<UserAnswer> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    @TableId(value = "id",type = IdType.ID_WORKER_STR)
    private String id;

    @ApiModelProperty(value = "对应的问题id")
    @TableField("topic_id")
    private String topicId;

    @ApiModelProperty(value = "答案ID")
    @TableField("answer_id")
    private String answerId;

    //答案对应用户回答的 问卷ID
    @TableField("questionnaire_user_id")
    private String questionnaireUserId;


    @ApiModelProperty(value = "得分")
    @TableField("is_score")
    private String isScore;

    @ApiModelProperty(value = "0正常 1停用")
    @TableField("del_flag")
    private String delFlag;

    //自动新增时间
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private String createTime;
    //自动更新时间

    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    private String updateTime;



    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }
    public String getTopicId() {
        return topicId;
    }

    public void setTopicId(String topicId) {
        this.topicId = topicId;
    }
    public String getanswerId() {
        return answerId;
    }

    public void setanswerId(String answerId) {
        this.answerId = answerId;
    }
    public String getIsScore() {
        return isScore;
    }

    public void setIsScore(String isScore) {
        this.isScore = isScore;
    }
    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }
    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }
    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "UserAnswer{" +
            "id=" + id +
            ", topicId=" + topicId +
            ", answerId=" + answerId +
            ", isScore=" + isScore +
            ", delFlag=" + delFlag +
            ", createTime=" + createTime +
            ", updateTime=" + updateTime +
        "}";
    }
}
